



#import <Foundation/Foundation.h>


//GCD - 只执行一次
#define YHDISPATCH_ONCE(onceBlock) static dispatch_once_t onceToken; dispatch_once(&onceToken, onceBlock);
//GCD - 在Main线程上运行
#define YHDISPATCH_MAIN_THREAD(mainQueueBlock) dispatch_async(dispatch_get_main_queue(), mainQueueBlock);
//GCD - 开启异步线程
#define YHDISPATCH_GLOBAL_QUEUE_DEFAULT(globalQueueBlock) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), globalQueueBlocl);
//GCD - 开启延迟执行
#define YHDISPATCH_AFTER(time,afterBlock) dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(time * NSEC_PER_SEC)), dispatch_get_main_queue(), afterBlock);

//显示时间
#define YHDismissTime 2.0

/**
 回调Block
 */
typedef void(^alertCompletionBlock)(void);

/**
 确认键回调Block
 */
typedef alertCompletionBlock OKCompletion;

/**
 取消键回调Block
 */
typedef alertCompletionBlock cancelCompletion;

@interface ShowAlertTool : NSObject


#pragma mark - 确认键AlertVC弹窗选择(单键)
/**
 确认键AlertVC弹窗选择(单键,有回调)
 
 @param title 标题
 @param message 消息
 @param OKCompletion 确认键回调
 */
+(void)yh_showMyAlertTitle:(NSString*)title andMessage:(NSString *)message OKCompletion:(alertCompletionBlock)OKCompletion;

/**
 确认键AlertVC弹窗选择(单键,无回调)
 */
+(void)yh_showMyAlertTitle:(NSString*)title andMessage:(NSString *)message;



#pragma mark - 确认和取消双键AlertVC弹窗选择(双键)

/**
 弹窗选择(双键,有回调-自定义按钮文字)
 
 @param title 标题
 @param message 消息
 @param btn1Title 按钮1标题
 @param btn2Title 按钮2标题
 @param OKCompletion 按钮1键回调
 @param cancelCompletion 按钮2键回调
 */
+ (void)yh_showMyRemindAlertTitle:(NSString*)title andMessage:(NSString *)message btn1Title:(NSString *)btn1Title btn2Title:(NSString *)btn2Title OKCompletion:(alertCompletionBlock)OKCompletion cancelCompletion:(alertCompletionBlock)cancelCompletion;


/**
 弹窗选择(双键,有回调-默认按钮文字)
 
 @param title 标题
 @param message 消息
 @param OKCompletion 确认键回调
 @param cancelCompletion 取消键回调
 */
+ (void)yh_showMyRemindAlertTitle:(NSString*)title andMessage:(NSString *)message OKCompletion:(alertCompletionBlock)OKCompletion cancelCompletion:(alertCompletionBlock)cancelCompletion;

/**
 弹窗选择(双键,无回调-默认按钮文字)
 */
//+ (void)yh_showMyRemindAlertTitle:(NSString*)title andMessage:(NSString *)message;

#pragma mark - 确认和取消双键AlertVC弹窗选择(双键-StyleActionSheet模式)

/**
 弹窗选择(双键-StyleActionSheet模式-有回调-设置按钮文字)
 
 @param title 标题
 @param message 消息
 @param btn1Title 按钮1标题
 @param btn2Title 按钮2标题
 @param OKCompletion 按钮1键回调
 @param cancelCompletion 按钮2键回调
 */
+ (void)yh_showMyRemindAlertStyleActionSheetTitle:(NSString*)title andMessage:(NSString *)message btn1Title:(NSString *)btn1Title btn2Title:(NSString *)btn2Title OKCompletion:(alertCompletionBlock)OKCompletion  cancelCompletion:(alertCompletionBlock)cancelCompletion;

/**
 弹窗选择(双键-StyleActionSheet模式-有回调-默认确认/取消安妞)
 
 @param title 标题
 @param message 消息
 @param OKCompletion 确认键回调
 @param cancelCompletion 取消键回调
 */
+ (void)yh_showMyRemindAlertStyleActionSheetTitle:(NSString*)title andMessage:(NSString *)message OKCompletion:(alertCompletionBlock)OKCompletion  cancelCompletion:(alertCompletionBlock)cancelCompletion;




@end
